//
//  WMEYiJianViewController.m
//  everyDay_duiTang
//
//  Created by 恩叔 on 16/3/1.
//  Copyright © 2016年 enshu. All rights reserved.
//

#import "WMEYiJianViewController.h"

@interface WMEYiJianViewController ()
@property (nonatomic, retain)UIWebView *webView;
@end

@implementation WMEYiJianViewController
- (void)dealloc
{
    [_webView release];
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStyleDone target:self action:@selector(huiqu:)];
    [self tel3];
}
- (void)tel3
{
    // 提示：不要将webView添加到self.view，如果添加会遮挡原有的视图
    // 懒加载
    if (_webView == nil) {
        _webView = [[UIWebView alloc] init];
    }
    NSLog(@"%p", _webView);
    
    //    _webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
    //    [self.view addSubview:_webView];
    
    NSURL *url = [NSURL URLWithString:@"tel://18502431055"];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    
    [_webView loadRequest:request];
}
- (void)huiqu:(UINavigationBar *)btn
{
    [self dismissViewControllerAnimated:YES completion:^{
        NSLog(@"回去");
    }];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
